package com.lgt.fishmall.order.feigh;


import com.lgt.common.to.SaveAddressTo;
import com.lgt.common.utils.R;
import com.lgt.fishmall.order.vo.MemberAddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("fishmall-member")
public interface MemberFeignService {

    /**
     * 查询当前用户的全部收货地址
     * @param memberId
     * @return
     */
    @GetMapping(value = "/member/memberreceiveaddress/{memberId}/address")
    List<MemberAddressVo> getAddress(@PathVariable("memberId") Long memberId);

    /**
     * 新增用户的收货地址
     *
     */
    @RequestMapping(value = "/member/memberreceiveaddress/saveAddress")
    SaveAddressTo saveAddress(SaveAddressTo saveAddressTo);

    @RequestMapping("/member/member/name")
    String infoName(@RequestBody Long memberId);
}
